import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 高生平
 * Date: 2025-09-06
 * Time: 18:54
 */
public class Test {

    public static void print(int n) {
        if (n > 9) {
            print (n / 10);
        }
        System.out.print(n % 10 + " ");
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int num = sc.nextInt();
            print(num);
            System.out.println();
        }
    }
}
